package Resource_method;

import interface_method.AbstractPlayer;
import interface_method.ChessContext;

import java.awt.Point;

public class trueChessContext implements ChessContext
{
	byte color;
	Resource res;
	public trueChessContext(byte color)
	{
		this.color = color;
		this.res = Resource.getResource();
	}
	public Point[] getAvailablePositionsForCurrentStep()
	{
		Point []p = new Point[1];
		return (Point[]) res.getAvailables().toArray(p);
	}

	public byte[][] getChessboard()
	{
		// TODO Auto-generated method stub
		return res.getChessboard();
	}

	public int getChessboardHeight()
	{
		// TODO Auto-generated method stub
		return res.getHeight();
	}

	public int getChessboardWidth()
	{
		// TODO Auto-generated method stub
		return res.getWidth();
	}

	public int getLeftMemory()
	{
		// TODO Auto-generated method stub
		return 0;
	}

	public int getLeftTime()
	{
		// TODO Auto-generated method stub
		return 0;
	}

	public int getMemoryLimit()
	{
		// TODO Auto-generated method stub
		return 0;
	}

	public boolean getMyColor()
	{
		// TODO Auto-generated method stub
		return (this.color == AbstractPlayer.BLACK) ? true : false;
	}

	public Point getStep(int step)
	{
		// TODO Auto-generated method stub
		
		return null;
	}

	public int getStepTimeLimit()
	{
		// TODO Auto-generated method stub
		return 0;
	}

	public int getTotalLeftTime()
	{
		// TODO Auto-generated method stub
		return 0;
	}

	public int getTotalSteps()
	{
		// TODO Auto-generated method stub
		return res.getSteps();
	}

	public int getTotalTimeLimit()
	{
		// TODO Auto-generated method stub
		return 0;
	}
}
